package com.system.exam.admin.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.util.ArrayList;
import java.util.List;

/**
 * 菜单表
 *
 * @TableName sys_menu
 */
@TableName(value = "sys_menu")
@Data
public class SysMenu extends BaseEntity {


    /**
     * 菜单名称
     */
    @TableField(value = "name")
    private String name;

    /**
     * 菜单图标
     */
    @TableField(value = "icon")
    private String icon;

    /**
     * 父级菜单
     */
    @TableField(value = "parent_id")
    private Long parentId;

    /**
     * 菜单排序
     */
    @TableField(value = "order_num")
    private Long orderNum;

    /**
     * 菜单路径
     */
    @TableField(value = "path")
    private String path;

    /**
     * 前端路由组件路径
     */
    @TableField(value = "component")
    private String component;

    /**
     * 菜单类型
     */
    @TableField(value = "menu_type")
    private String menuType;

    /**
     * 菜单权限
     */
    @TableField(value = "perms")
    private String perms;
    /**
     * 是否显示在菜单栏
     */
    @TableField(value = "is_show")
    private int isShow;

    @TableField(exist = false)
    private List<SysMenu> children = new ArrayList<>();

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}